#ifndef OPENGLDEVICE_H_
#define OPENGLDEVICE_H_

#include "PantsuRenderDevice.h"

namespace Pantsu {

	class OpenGLDevice : public PantsuRenderDevice {

	public:
		OpenGLDevice( HINSTANCE i_instance );
		virtual ~OpenGLDevice();

		HRESULT Init( int i_iWidth, int i_iHeight );
		void	RenderOneFrame();
		void    DeInit();

		void    Release();
		HRESULT UseWindow( UINT i_nHwnd );
		HRESULT BeginRendering( bool, bool, bool );
		HRESULT Clear( bool, bool, bool );
		void    EndRendering();

		HRESULT EnableOpenGL( HWND hWnd, HDC *hDC, HGLRC *hRC );
		void	DisableOpenGL( HWND hWnd, HDC hDC, HGLRC hRC );

	private:
		OpenGLDevice() {}

	public: /* inline */
		inline bool IsRunning() { return m_bRunning; }

	private:
		bool			m_bRunning;
		

		WNDCLASS wc;
		HWND hWnd;
		HDC hDC;
		HGLRC hRC;
		MSG msg;
	
	};
}

#endif